<template>
	<div class="conic">
	<div class="group" style="--t:1;--r:0">
		<div class="orbit" style="--i:1;--ball-color:var(--danger-color)">
		<div class="point"></div>
		</div>
	</div>
	<div class="group" style="--t:8;--r:1rem">
		<div class="orbit" style="--i:1">
		<div class="point"></div>
		</div>
		<div class="orbit" style="--i:2">
		<div class="point"></div>
		</div>
		<div class="orbit" style="--i:3">
		<div class="point"></div>
		</div>
		<div class="orbit" style="--i:4">
		<div class="point"></div>
		</div>
		<div class="orbit" style="--i:5">
		<div class="point"></div>
		</div>
		<div class="orbit" style="--i:6">
		<div class="point"></div>
		</div>
		<div class="orbit" style="--i:7">
		<div class="point"></div>
		</div>
		<div class="orbit" style="--i:8">
		<div class="point"></div>
		</div>
	</div>
	<div class="group" style="--t:10;--r:2rem">
		<div class="orbit" style="--i:1">
		<div class="point"></div>
		</div>
		<div class="orbit" style="--i:2">
		<div class="point"></div>
		</div>
		<div class="orbit" style="--i:3">
		<div class="point"></div>
		</div>
		<div class="orbit" style="--i:4">
		<div class="point"></div>
		</div>
		<div class="orbit" style="--i:5">
		<div class="point"></div>
		</div>
		<div class="orbit" style="--i:6">
		<div class="point"></div>
		</div>
		<div class="orbit" style="--i:7">
		<div class="point"></div>
		</div>
		<div class="orbit" style="--i:8">
		<div class="point"></div>
		</div>
		<div class="orbit" style="--i:9">
		<div class="point"></div>
		</div>
		<div class="orbit" style="--i:10">
		<div class="point"></div>
		</div>
	</div>
	<div class="group" style="--t:12;--r:3rem">
		<div class="orbit" style="--i:1">
		<div class="point"></div>
		</div>
		<div class="orbit" style="--i:2">
		<div class="point"></div>
		</div>
		<div class="orbit" style="--i:3">
		<div class="point"></div>
		</div>
		<div class="orbit" style="--i:4">
		<div class="point"></div>
		</div>
		<div class="orbit" style="--i:5">
		<div class="point"></div>
		</div>
		<div class="orbit" style="--i:6">
		<div class="point"></div>
		</div>
		<div class="orbit" style="--i:7">
		<div class="point"></div>
		</div>
		<div class="orbit" style="--i:8">
		<div class="point"></div>
		</div>
		<div class="orbit" style="--i:9">
		<div class="point"></div>
		</div>
		<div class="orbit" style="--i:10">
		<div class="point"></div>
		</div>
		<div class="orbit" style="--i:11">
		<div class="point"></div>
		</div>
		<div class="orbit" style="--i:12">
		<div class="point"></div>
		</div>
	</div>
	<div class="group" style="--t:14;--r:4rem">
		<div class="orbit" style="--i:1">
		<div class="point"></div>
		</div>
		<div class="orbit" style="--i:2">
		<div class="point"></div>
		</div>
		<div class="orbit" style="--i:3">
		<div class="point"></div>
		</div>
		<div class="orbit" style="--i:4">
		<div class="point"></div>
		</div>
		<div class="orbit" style="--i:5">
		<div class="point"></div>
		</div>
		<div class="orbit" style="--i:6">
		<div class="point"></div>
		</div>
		<div class="orbit" style="--i:7">
		<div class="point"></div>
		</div>
		<div class="orbit" style="--i:8">
		<div class="point"></div>
		</div>
		<div class="orbit" style="--i:9">
		<div class="point"></div>
		</div>
		<div class="orbit" style="--i:10">
		<div class="point"></div>
		</div>
		<div class="orbit" style="--i:11">
		<div class="point"></div>
		</div>
		<div class="orbit" style="--i:12">
		<div class="point"></div>
		</div>
		<div class="orbit" style="--i:13">
		<div class="point"></div>
		</div>
		<div class="orbit" style="--i:14">
		<div class="point"></div>
		</div>
	</div>
	<div class="group" style="--t:16;--r:5rem">
		<div class="orbit" style="--i:1">
		<div class="point"></div>
		</div>
		<div class="orbit" style="--i:2">
		<div class="point"></div>
		</div>
		<div class="orbit" style="--i:3">
		<div class="point"></div>
		</div>
		<div class="orbit" style="--i:4">
		<div class="point"></div>
		</div>
		<div class="orbit" style="--i:5">
		<div class="point"></div>
		</div>
		<div class="orbit" style="--i:6">
		<div class="point"></div>
		</div>
		<div class="orbit" style="--i:7">
		<div class="point"></div>
		</div>
		<div class="orbit" style="--i:8">
		<div class="point"></div>
		</div>
		<div class="orbit" style="--i:9">
		<div class="point"></div>
		</div>
		<div class="orbit" style="--i:10">
		<div class="point"></div>
		</div>
		<div class="orbit" style="--i:11">
		<div class="point"></div>
		</div>
		<div class="orbit" style="--i:12">
		<div class="point"></div>
		</div>
		<div class="orbit" style="--i:13">
		<div class="point"></div>
		</div>
		<div class="orbit" style="--i:14">
		<div class="point"></div>
		</div>
		<div class="orbit" style="--i:15">
		<div class="point"></div>
		</div>
		<div class="orbit" style="--i:16">
		<div class="point"></div>
		</div>
	</div>
	<div class="group" style="--t:18;--r:6rem">
		<div class="orbit" style="--i:1">
		<div class="point"></div>
		</div>
		<div class="orbit" style="--i:2">
		<div class="point"></div>
		</div>
		<div class="orbit" style="--i:3">
		<div class="point"></div>
		</div>
		<div class="orbit" style="--i:4">
		<div class="point"></div>
		</div>
		<div class="orbit" style="--i:5">
		<div class="point"></div>
		</div>
		<div class="orbit" style="--i:6">
		<div class="point"></div>
		</div>
		<div class="orbit" style="--i:7">
		<div class="point"></div>
		</div>
		<div class="orbit" style="--i:8">
		<div class="point"></div>
		</div>
		<div class="orbit" style="--i:9">
		<div class="point"></div>
		</div>
		<div class="orbit" style="--i:10">
		<div class="point"></div>
		</div>
		<div class="orbit" style="--i:11">
		<div class="point"></div>
		</div>
		<div class="orbit" style="--i:12">
		<div class="point"></div>
		</div>
		<div class="orbit" style="--i:13">
		<div class="point"></div>
		</div>
		<div class="orbit" style="--i:14">
		<div class="point"></div>
		</div>
		<div class="orbit" style="--i:15">
		<div class="point"></div>
		</div>
		<div class="orbit" style="--i:16">
		<div class="point"></div>
		</div>
		<div class="orbit" style="--i:17">
		<div class="point"></div>
		</div>
		<div class="orbit" style="--i:18">
		<div class="point"></div>
		</div>
	</div>
	</div>
</template>

<script>
//https://codepen.io/alphardex/pen/bGwYgEa
export default {
  name: "3D-christmas-tree",
  data() {
    return {
      prop1: false,
      prop2: ''
    }
  },
  methods: {
      fun1(){
        
      }
  }
}
</script>

<style lang="scss" scoped>

body {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  margin: 0;
  background: black;
}

*,
*::before,
*::after {
  transform-style: preserve-3d;
}

.conic {
  --group-gap: 1.5rem;
  --ball-color: white;
  --ball-width: 0.75rem;
  --anime: linear both infinite;

  display: flex;
  flex-direction: column;
  perspective: 500px;
  transform: rotateX(-15deg);

  .group {
    height: var(--group-gap);
  }

  .orbit {
    --rotate-radius: var(--r);
    --rotate-duration: 10s;
    --rotate-delay: calc(
      var(--i) * calc(var(--rotate-duration) / var(--t)) * -1
    );
    position: absolute;
    width: var(--ball-width);
    height: var(--ball-width);
    animation: rotate-y var(--anime) var(--rotate-duration) var(--rotate-delay);

    .point {
      position: absolute;
      width: 100%;
      height: 100%;
      transform: translateZ(calc(var(--rotate-radius) * -1));

      &::before {
        position: absolute;
        content: "";
        width: 100%;
        height: 100%;
        background: var(--ball-color);
        border-radius: 50%;
        animation: rotate-y-reverse var(--anime) var(--rotate-duration)
          var(--rotate-delay);
      }
    }

    &:nth-child(3n + 1) {
      --ball-color: white;
    }

    &:nth-child(3n + 2) {
      --ball-color: var(--success-color);
    }

    &:nth-child(3n + 3) {
      --ball-color: var(--danger-color);
    }
  }
}

@keyframes rotate-y {
  from {
    transform: rotateY(0);
  }

  to {
    transform: rotateY(1turn);
  }
}

@keyframes rotate-y-reverse {
  from {
    transform: rotateY(0);
  }

  to {
    transform: rotateY(-1turn);
  }
}

</style>
